<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>建议使用信管帮APP</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        html,body{
            height: 100%;
        }
        ul li{
            list-style: none;
        }
        a{
            text-decoration: none;
            
        }
        a:link{
            color: #404040;
        }
        a:visited{
            color: #404040;
        }
        a:hover{
            color: #404040;
        }
        a:active{
            color: #404040;
        }
        ::-webkit-scrollbar{
            /* width: 0; 移动端取消滚动条无效*/
            display: none;
        }
        body{
            background: #ededed;/*#2493f1*/
            display: flex;
            flex-direction: column;
            font-family: 微软雅黑;
            font-size: .3865rem;
            letter-spacing: .0169rem;
            position: relative;
            overflow: hidden;/*禁止上下滑动*/
            -webkit-user-select:none;
            -moz-user-select:none;
            -ms-user-select:none;
            user-select:none;
            perspective: 24.1546rem;
        }
        
        section{/*
            border: 1px solid red;*/
            border-top-left-radius:  .3623rem;
            border-top-right-radius:  .3623rem;
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            overflow: hidden;
        }
        


        
        
    </style>
    <link rel="stylesheet" href="./css/header.css">
    <link rel="stylesheet" href="./css/content.css">
    <!-- 引入样式文件 -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vant@2.2/lib/index.css" referrerpolicy="no-referrer"/>
    <script src="../../../../lib/vue.js"></script>
    <script src="../../../../lib/axios.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/vant@2.2/lib/vant.min.js" referrerpolicy="no-referrer"></script>
    
    
</head>
<body>
    <section>
        <!-- header -->
        <header>
            <div class="backBtn"></div>
            <div class="left">取消</div>
            <span class="title title2">
                选择帮友
            </span>
            <div class="right">
                <button :disabled="resultList.length < 1" :style="resultList.length > 0 ? {background: '#07C062', color: '#fff'} : {}" @click="submit()">完成{{resultList.length == 0 ? '' : ('('+resultList.length+')')}}</button>
            </div>
        </header>
        
        
        <div class="content">
            <!-- 选择结果 -->
            <div class="resultBox">
                <div class="result">
                    <div class="imgList">
                        <span v-if="resultList.length == 0" style="color: #5a5a5ac3;font-size: .3744rem;margin-left: .2415rem;">请选择帮友</span>
                        <div>
                            <div class="userImg" v-for="(item, index) of resultList">
                                <img :src="item.userImg == '' ? '../../img/defaultUserImg.webp' : item.userImg" alt="">
                            </div>
                        </div>
                        
                    </div>
                    
                    <div class="close" @click="close()">取消</div>
                </div>
            </div>
            
            <!-- 好友列表 -->
            <ul class="ul1">
                <div class="box">
                    <span style="color: #5a5a5ac3;font-size: .3744rem;margin-left: .2415rem;width:100%;display:flex;flex-direction:row;justify-content:flex-start;padding:0.2415rem;box-sizing:border-box;">我的帮友</span>
                    <li v-for="(item, index) in friendList" :index="index" @click="selectFriend(item.userid, item.userImg)" :uid="item.userid">
                        <div class="top">
                            <div class="checkBox"></div>
                            <div class="left">
                                <!-- 头像 -->
                                <div class="img">
                                        <img :src="item.userImg == '' ? '../../../../images/person/person_senter/defaultUserImg.webp' : item.userImg" alt="">
                                </div>
                                <!-- 备注 -->
                                <span class="name">{{item.note}}</span>
                            </div>
                        </div>
                        <hr class="bottom">
                    </li>
                </div>
                
            </ul>
            

            
        
            
        
    </section>
    

    <script src="https://cdn.jsdelivr.net/npm/vant@2.2/lib/vant.min.js" referrerpolicy="no-referrer"></script>
    <script src="./js/main.js"></script>
    <script>
        document.querySelector(".backBtn").onclick=function(){
            window.history.go(-1)
        }
    </script>
    
    <script>
        //根据设备宽度计算html的font-size
        function resetHtmlFont(){
            //获取html对象并动态设置font-size = 设备宽度的1/10
            document.documentElement.style.fontSize = screen.width/10 + 'px';
        }
        //执行一下
        resetHtmlFont();
        //如果窗口大小改变了，则重新计算基础font-size
        window.onresize = resetHtmlFont;
    </script>
</body>
</html>